//弹出层
$("#mail").each(function () {
    $(this).on('click', function () {
        $(".mc").show();
        $(".m_modal").show();

    });
});
$(".m_footer #mail").on('click', function () {
    $(".mc").show();
    $(".m_modal").show();


});

$(".m_close,.m_modal .modal_footer .x_btn").click(function () {
    $(".mc").hide();
    $(".m_modal").hide();
});

function postdata(url) {
    //var $postUrl = "http://xdcplus.cc/cfs/public/mail/index/index";
    var $postUrl = url;
    var visitorname = $("#visitorname").val();
    var visitorphone = $("#visitorphone").val();
    var visitoremail = $("#visitoremail").val();
    var visitorcompany = $("#visitorcompany").val();
    var visitorsex = $("input[type='radio']:checked").val();
    var message = $("#message").val();
    var $contactData = "mailto=contactus@xdcplus.com&mailfrom=guanwang@xdcplus.com"
        + "&subject=联系我们&content=姓名:" + visitorname
        + "<br>电话:" + visitorphone
        + "<br>邮箱:" + visitoremail
        + "<br>公司:" + visitorcompany
        + "<br>性别:" + visitorsex
        + "<br>留言:" + message;

    postDataAjax({
        id: 'sendresult',
        data: $contactData,
        url: $postUrl
    });
};
